<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>提交数据</title>
    <script src="./static/jquery-3.4.1.js"></script>
    <script>
        $(function(){
            $.ajax({
                url:'http://127.0.0.1:3000/login',
                type:'POST',
                data:{
                    username:'admin',
                    password:'123456'
                },
                success(res){
                    console.log(res)
                    sessionStorage.setItem("user",JSON.stringify(res))
                    setTimeout(function(){location= "userList.html"},3000)            
                },
                error(e){
                    console.log(e)
                }
            })
        })
    </script>
</head>
<body>
    <div id="app">
       <form action="http://127.0.0.1:3000/login" method="POST">
       <input type="text" name="username"><br>
       <input type="text" name="password"><br>
       <button type="submit">upload</button>
    </form>
    </div>
</body>
</html>